//
//  Section.mm
//  Racing
//
//  Created by vy phan on 4/11/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Section.h"


@implementation Section
-(id)initWithX:(int)x Y:(int)y
{
	self = [super init];
	if (self != nil) {
		bounds = (Rectangle*)[Rectangle x:x y:y width:SECTION_WIDTH height:SECTION_HEIGHT];
	}
	return self;
}

-(Section*) getNextSection
{
	return self->next;
}

-(Section*) getPreviousSection
{
	return self->prev;
}

-(Rectangle*) getBounds
{
	return self->bounds;
}

-(void) setNextSection:(Section*) section
{
	self->next = section;
	section->prev = self;
}

-(int) type
{
	return self->type;
}

-(void)dealloc
{
	[self->next release];
	[self-prev release];
	[self->bounds release];
	[super dealloc];
}
@end
